/* Contains the top panel on the gui that contains the current selected ship's hp bar, the end turn button, and the ship order
 * 
 */

package gui.battle;

import gui.GameGUI;
import gui.utilities.*;
import item.ship.Ship;

import javax.swing.*;

import java.awt.*;
import java.awt.event.*;

public class TopPanel extends JPanel {

	
	Ship ship;
	
	
	//0 param constructor that creates the topPanel based on the given ship
	public TopPanel(Ship s){
	
		this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
		this.setMaximumSize(new Dimension(1200, 70));
		
		JPanel temp1 = new JPanel();
		JPanel temp2 = new JPanel();
		MyButton endTurn = new MyButton("assets\\images\\buttonImages\\normal\\end_turn.png", "assets\\images\\buttonImages\\hover\\end_turn.png", 100, 70);
		
		endTurn.addMouseListener(new MouseAdapter(){
			
			public void mouseClicked(MouseEvent e){
				
				GameGUI.battle.endTurn();
			}//mouseClicked
		});
		
		temp1.setMinimumSize(new Dimension(550, 70));
		temp1.setMaximumSize(new Dimension(550, 70));
		temp1.setBackground(Color.PINK);
		
		temp2.setMinimumSize(new Dimension(550, 70));
		temp2.setMaximumSize(new Dimension(550, 70));
		temp2.setBackground(Color.ORANGE);
		
		this.add(temp1);
		this.add(endTurn);
		this.add(temp2);
		
	}//default constructor
}//TopPanel
